package com.doctor.web.mapper;

import com.doctor.web.domain.ProductDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper{
    int save(ProductDO productDO);
    int removeById(Long id);
    int updateById(ProductDO productDO);
    List<ProductDO> getProductList();
    List<ProductDO> getProductsByCategory(@Param("categoryName") Integer categoryName);
    List<ProductDO> getProductsSortedBySalesDesc();
    List<ProductDO> getProductsSortedByPriceAsc();
    List<ProductDO> getProductsSortedByPriceDesc();
    ProductDO getById(Long id);

}